package com.jx.gocomtask;

import java.net.URISyntaxException;

import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;

import com.jx.gocomtask.webservice.service.impl.GxinMenu;

public class ApplicationStartup implements ApplicationListener<ContextRefreshedEvent>{
	private static org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ApplicationStartup.class);

	@Override
	public void onApplicationEvent(ContextRefreshedEvent event) {
		GxinMenu gxinMenu=event.getApplicationContext().getBean(GxinMenu.class);
		logger.info("ApplicationStartup.....");
		try {
			gxinMenu.tryMenu(true);
		} catch (URISyntaxException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
